import BaseNode from './BaseNode';

// Composite 组合节点，可以连接多个子节点，用于决策行为树走向
export default abstract class Composite extends BaseNode {

  protected readonly children: BaseNode[]

  constructor(name = 'Composite', children: BaseNode[] = []) {
    super(name);
    this.children = children;
  }

  pushChild(child: BaseNode) {
    this.children.push(child)
  }
};
